cmake_minimum_required(VERSION 3.10)

find_package(Boost COMPONENTS program_options system date_time)

include_directories($ENV{DM2016_DEV}/tinyxml/inc ${Boost_INCLUDE_DIRS})
include_directories($ENV{DM2016_DEV})

link_directories(${LIBRARY_OUTPUT_PATH})

aux_source_directory(src SRC)

add_executable(modbusmap ${SRC})

if( Boost_FOUND )
    target_link_libraries(modbusmap oslog dmos osmsg protocol string misc env tinyxml json ${Boost_LIBRARIES})
else()
    target_link_libraries(modbusmap oslog dmos osmsg protocol string misc env tinyxml json boost_program_options)
endif()